﻿<%@ Page Title="Relacionar Clientes" Language="C#" MasterPageFile="~/MasterPage/Master.Master" AutoEventWireup="true" CodeBehind="wFrmClienteRelacion.aspx.cs" Inherits="Crosland.Automotriz.Web.CRM.wFrmClienteRelacion" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxRoundPanel" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="server">


    <div class="main-header" style="width:100%;" __designer:mapid="5f1">
        <div class="main-titulo" style="text-align: left" __designer:mapid="5f2">
            Relacionar Clientes</div>
    </div>

    
    <div style="padding:15px">
    
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td style="width: 105px">
                            <dx:ASPxButton ID="btnAgregar" runat="server" 
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" 
                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Agregar" 
                                Width="100px" onclick="btnAgregar_Click">
                                <Image Url="~/Images/add2.png">
                                </Image>
                            </dx:ASPxButton>
            </td>
            <td style="width: 105px">
                            <dx:ASPxButton ID="btnQuitar" runat="server" 
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" 
                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Quitar" 
                                Width="100px" onclick="btnQuitar_Click">
                                <ClientSideEvents Click="function(s, e) {
	e.processOnServer = confirm('¿Desea quitar esta razón social?');
}" />
                                <Image Url="~/Images/cancel.gif">
                                </Image>
                            </dx:ASPxButton>
            </td>
            <td>
                <dx:ASPxButton ID="btnSalir" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Salir" 
                    Width="100px" onclick="btnSalir_Click">
                    <Image Url="~/Images/logout.png">
                    </Image>
                </dx:ASPxButton>
            </td>
        </tr>
        <tr>
            <td style="width: 115px">
                &nbsp;</td>
            <td style="width: 115px">
                &nbsp;</td>
            <td height="2">
                &nbsp;</td>
        </tr>
    </table>
    <dx:ASPxRoundPanel ID="ASPxRoundPanel4" runat="server" 
        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
        CssPostfix="Office2010Blue" EnableDefaultAppearance="False" 
        GroupBoxCaptionOffsetX="6px" GroupBoxCaptionOffsetY="-19px" 
        HeaderText="Cliente - Nombre Comercial" 
        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="100%">
        <contentpaddings paddingbottom="10px" paddingleft="9px" paddingright="11px" 
            paddingtop="10px" />
        <HeaderStyle>
        <paddings paddingbottom="6px" paddingleft="9px" paddingright="11px" 
            paddingtop="3px" />
        </HeaderStyle>
        <PanelCollection>
<dx:PanelContent runat="server" SupportsDisabledAttribute="True">
    <asp:Label ID="txtNombreComercial" runat="server" Font-Size="14pt"></asp:Label>
            </dx:PanelContent>
</PanelCollection>
    </dx:ASPxRoundPanel>
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
            <td>
                &nbsp;</td>
            <td align="right">
                <table width="205" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="105" height="2">
                            &nbsp;</td>
                        <td width="100">
                            &nbsp;</td>
                    </tr>
                    </table>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <dx:ASPxGridView ID="gvRazonesSociales" runat="server" 
                    Caption="Razones Sociales" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" Width="100%" AutoGenerateColumns="False" 
                    KeyFieldName="ID_CLIENTE">
                    <Columns>
                        <dx:GridViewDataTextColumn Caption="Razón Social" FieldName="DES_CLIENTE" 
                            VisibleIndex="0">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="RUC" FieldName="NIF" VisibleIndex="1">
                        </dx:GridViewDataTextColumn>
                    </Columns>
                    <SettingsBehavior AllowDragDrop="False" AllowGroup="False" AllowSort="False" 
                        AllowFocusedRow="True" AllowSelectSingleRowOnly="True" />
                    <SettingsPager Visible="False" Mode="ShowAllRecords">
                    </SettingsPager>
                    <Settings ShowGroupButtons="False" />
                    <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                        <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                        </LoadingPanelOnStatusBar>
                        <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                        </LoadingPanel>
                    </Images>
                    <ImagesFilterControl>
                        <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                        </LoadingPanel>
                    </ImagesFilterControl>
                    <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                        CssPostfix="Office2010Blue">
                        <Header ImageSpacing="5px" SortingImageSpacing="5px">
                        </Header>
                        <LoadingPanel ImageSpacing="5px">
                        </LoadingPanel>
                    </Styles>
                    <StylesPager>
                        <PageNumber ForeColor="#3E4846">
                        </PageNumber>
                        <Summary ForeColor="#1E395B">
                        </Summary>
                    </StylesPager>
                    <StylesEditors ButtonEditCellSpacing="0">
                        <ProgressBar Height="21px">
                        </ProgressBar>
                    </StylesEditors>
                </dx:ASPxGridView>
            </td>
        </tr>
        </table>
    </div>
    <dx:ASPxPopupControl ID="pcClientes" runat="server" AllowDragging="True" 
        CloseAction="CloseButton" 
        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
        CssPostfix="Office2010Blue" EnableHotTrack="False" HeaderText="Buscar Clientes" 
        Modal="True" PopupHorizontalAlign="WindowCenter" 
        PopupVerticalAlign="WindowCenter" 
        SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="500px">
        <HeaderImage Url="~/Images/user.png">
        </HeaderImage>
        <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
        </LoadingPanelImage>
        <HeaderStyle>
        <Paddings PaddingLeft="7px" />
        </HeaderStyle>
        <LoadingPanelStyle ImageSpacing="5px">
        </LoadingPanelStyle>
        <ContentCollection>
<dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
    <table width="100%">
        <tr>
            <td style="width: 64px">
                <asp:Label ID="Label1" runat="server" Text="Nombre:"></asp:Label>
            </td>
            <td style="width: 205px">
                <dx:ASPxTextBox ID="txtBuscarNombre" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" Height="25px" MaxLength="100" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="200px">
                    <Paddings PaddingLeft="5px" />
                </dx:ASPxTextBox>
            </td>
            <td>
                <asp:Label ID="Label2" runat="server" Text="RUC:"></asp:Label>
            </td>
            <td>
                <dx:ASPxTextBox ID="txtBuscarRUC" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" Height="25px" MaxLength="11" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="100px">
                    <Paddings PaddingLeft="5px" />
                </dx:ASPxTextBox>
            </td>
            <td>
                &nbsp;</td>
            <td>
                <dx:ASPxButton ID="btnBuscar" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" OnClick="btnBuscar_Click" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Buscar" 
                    Width="100px">
                    <Image Url="~/Images/search.png">
                    </Image>
                </dx:ASPxButton>
            </td>
        </tr>
        <tr>
            <td style="width: 64px">
                &nbsp;</td>
            <td style="width: 205px">
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
    <dx:ASPxGridView ID="gvBusqueda" runat="server" AutoGenerateColumns="False" 
        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
        CssPostfix="Office2010Blue" KeyFieldName="ID_CLIENTE" 
        OnPageIndexChanged="gvBusqueda_PageIndexChanged" Width="100%">
        <Columns>
            <dx:GridViewCommandColumn Caption=" " ShowInCustomizationForm="True" 
                ShowSelectCheckbox="True" VisibleIndex="0" Width="50px">
            </dx:GridViewCommandColumn>
            <dx:GridViewDataTextColumn Caption="Razón Social" FieldName="DES_CLIENTE" 
                ShowInCustomizationForm="True" VisibleIndex="1">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn Caption="RUC" FieldName="NIF" 
                ShowInCustomizationForm="True" VisibleIndex="2" Width="70px">
            </dx:GridViewDataTextColumn>
        </Columns>
        <SettingsBehavior AllowClientEventsOnLoad="False" AllowDragDrop="False" 
            AllowGroup="False" AllowSort="False" />
        <Settings ShowGroupButtons="False" ShowHeaderFilterBlankItems="False" />
        <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
            <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            </LoadingPanelOnStatusBar>
            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            </LoadingPanel>
        </Images>
        <ImagesFilterControl>
            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
            </LoadingPanel>
        </ImagesFilterControl>
        <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
            CssPostfix="Office2010Blue">
            <Header ImageSpacing="5px" SortingImageSpacing="5px">
            </Header>
            <LoadingPanel ImageSpacing="5px">
            </LoadingPanel>
        </Styles>
        <StylesPager>
            <PageNumber ForeColor="#3E4846">
            </PageNumber>
            <Summary ForeColor="#1E395B">
            </Summary>
        </StylesPager>
        <StylesEditors ButtonEditCellSpacing="0">
            <ProgressBar Height="21px">
            </ProgressBar>
        </StylesEditors>
    </dx:ASPxGridView>
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td style="width: 25px">
                &nbsp;</td>
            <td class="formato-tabla-td" style="width: 65px">
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td align="right" height="2">
                &nbsp;</td>
        </tr>
        <tr>
            <td style="width: 25px">
                <asp:Label ID="Label3" runat="server" Text="Ver "></asp:Label>
            </td>
            <td class="formato-tabla-td" style="width: 65px">
                <dx:ASPxComboBox ID="cboOpcion" runat="server" AllowMouseWheel="False" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" EnableAnimation="False" 
                    EnableDefaultAppearance="False" Height="25px" SelectedIndex="0" 
                    ShowLoadingPanel="False" ShowLoadingPanelImage="False" ShowShadow="False" 
                    Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                    Width="60px">
                    <Items>
                        <dx:ListEditItem Selected="True" Text="100" Value="100" />
                        <dx:ListEditItem Text="200" Value="200" />
                        <dx:ListEditItem Text="500" Value="500" />
                        <dx:ListEditItem Text="1000" Value="1000" />
                    </Items>
                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                    </LoadingPanelImage>
                    <LoadingPanelStyle ImageSpacing="5px">
                    </LoadingPanelStyle>
                    <ButtonStyle Width="13px">
                    </ButtonStyle>
                    <Paddings PaddingLeft="5px" />
                    <ValidationSettings>
                        <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                    </ValidationSettings>
                </dx:ASPxComboBox>
            </td>
            <td>
                <asp:Label ID="Label4" runat="server" Text="registros."></asp:Label>
            </td>
            <td align="right">
                <dx:ASPxButton ID="btnAgregarRazonesSociales" runat="server" 
                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                    CssPostfix="Office2010Blue" OnClick="btnAgregarRazonesSociales_Click" 
                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Aceptar" 
                    Width="100px">
                    <Image Url="~/Images/busqueda-show.png">
                    </Image>
                </dx:ASPxButton>
            </td>
        </tr>
    </table>
            </dx:PopupControlContentControl>
</ContentCollection>
    </dx:ASPxPopupControl>
</asp:Content>
